﻿#region License
//  Distrubted Under the GNU Public License version 2 (GPLv2)
// ========================================
// 
//  QuizzMasterStudio Version 3 
//  Copyright © 2012 , The Sparks (Autism App Jam 2014)
//  All rights reserved.  
// 
// Robert Long, Zephyr Yao, Hillary Chansavang, Li Xiao, Arial Xiao
// 
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//  
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//  
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//  The full license is also included in the root folder.
// 
// Robert Long
//  Email: rbtLong@live.com
#endregion

using System;
using System.Runtime.Serialization;

namespace Core.Features.Journal.ViewModel
{
    [DataContract]
    public enum Moods
    {
        [EnumMember(Value = "Happy")]
        Happy = 0,
        [EnumMember(Value = "Soso")]
        Soso,
        [EnumMember(Value = "Sad")]
        Sad
    }

    [DataContract]
    public class JournalEntry
    {
        private Moods _mood = Moods.Soso;
        private string _entry = string.Empty;
        private DateTime _date = DateTime.Now;

        [DataMember]
        public string Entry
        {
            get { return _entry; }
            set { _entry = value; }
        }

        [DataMember]
        public Moods Mood
        {
            get { return _mood; }
            set { _mood = value; }
        }

        [DataMember]
        public DateTime Date
        {
            get { return _date; }
            set { _date = value; }
        }

        [DataMember]
        public Guid Id { get; set; }

        public JournalEntry()
        {
            Id = Guid.NewGuid();
        }

        public override string ToString()
        {
            return string.Format("Date: {0}\nMood: {1}\nEntry: {2}\n--\n",
                Date.ToString("D"), Mood, Entry);
        }
    }
}
